package com.wenfs.demo.entity;

import com.wenfs.demo.util.result.ResultEnums;

/**
 * 自定义异常
 * @author wenfs
 */
public class MyException  extends RuntimeException{


  private static final long serialVersionUID = -6578894526492497688L;

  private String errorCode;

  public MyException(ResultEnums enums) {
    super(enums.getErrorMsg());
    this.errorCode = enums.getErrorCode();
  }

  public MyException(String errorCode, String errorMsg) {
    super(errorMsg);
    this.errorCode = errorCode;
  }

  public String getErrorCode() {
    return errorCode;
  }

  public void setErrorCode(String errorCode) {
    this.errorCode = errorCode;
  }


}
